#ifndef FPSCOUNTER
#define FPSCOUNTER

#include "ofMain.h"
#include "ofTrueTypeFont.h"
#include "ofEvents.h"

class fpsCounter{

public:
	fpsCounter();
	~fpsCounter();

	void draw(ofEventArgs& arg);
	void mouseDragged(ofMouseEventArgs& arg);
	void mousePressed(ofMouseEventArgs& arg);
	void mouseReleased(ofMouseEventArgs& arg);

private: 
	void drawFPS();
	void updateFpsString();
	
	int lastQueryTime;
	int lastFrameTotal;
	char fpsString[255];
	const int smoothingWindow;
	ofTrueTypeFont defaultFont;
	ofRectangle frame;
	bool dragging;
	int dragOffsetX;
	int dragOffsetY;
};

#endif